@extends('www/zc-666/layout')
@section('title',$activity->title)

@section('content')
    <div class="rule-main">

        <h2>绑定手机</h2>

        <form action="/www/zhongchou666/register_action?activityId={{$activityId}}&&orderId={{$orderId}}" method="post" enctype="multipart/form-data">

            <input type="hidden" name="_token" value="{{csrf_token()}}">

            <div class="register-box">
                <ul>
                    <li><input type="text"  id="name"  name="name" placeholder="姓名"></li>

                    <li>
                        <input type="tel" id="mobile" name="mobile" placeholder="手机号">
                        <p>
                            <select id="country">
                                @foreach($countrys as $coun)
                                    <option value="{{$coun->country_num_code}}" @if($coun->country_num_code == '86') selected @endif>{{$coun->country_china_name}}</option>
                                @endforeach
                            </select>
                        </p>
                    </li>
                    <li>
                        <input type="tel" id="code" name="code" placeholder="验证码">
                        <p onclick="register.getMobileCode()" id="codebtn">获取验证码</p>
                    </li>
                </ul>
            </div>

            <p class="register-btn" onclick="register.submitOrder()">立即绑定</p>
        </form>
    </div>
    <script>
        window.onload = function()
        {
            const title   = "{{$activity->share_title}}";
            const gTitle  = title;
            const link    = appRoot + "www/zhongchou666/index?activityId={{$activity->activity_id}}";
            const imgUrl  = appRoot + "{{$activity->share_img}}";
            const desc    = "{{$activity->share_desc}}";

            @if(is_online() && !is_windows())
                wx.config(<?php echo $weixinJs->config(array('onMenuShareAppMessage', 'onMenuShareTimeline'), false) ?>);
                wx.ready(function(){
                    set_wx_share(title,gTitle,desc,imgUrl,link);
                });
            @endif
        }
    </script>
@endsection





